﻿using CommandSystem;
using RemoteAdmin;
using System;


namespace Zombie.Command
{
    internal class ZombieCommand
    {
        [CommandHandler(typeof(RemoteAdminCommandHandler))]
        public sealed class NameChangeCommand : ICommand, IUsageProvider
        {
            public string Command => "RuleZombie";

            public bool SanitizeResponse => true;

            public string[] Aliases { get; } = { "RuleZ" };

            public string Description => "僵尸模式规则";

            public string[] Usage { get; } = { "出生点坐标X", "出生点坐标Y", "出生点坐标Z" };

            public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
            {
                bool isPlayer = sender is PlayerCommandSender;

                if (!isPlayer)
                {
                    response = "你必须以一名玩家身份发送该命令！";
                    return false;
                }

                if (arguments.Count != 3)
                {
                    response = "这似乎是不正确的格式";
                    return false;
                }

                response = "命令成功";
                return true;
            }
        }

    }
}
